﻿using IBll;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WebApi5_23.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EmpController : ControllerBase,IMemBll
    {
        IMemBll bll;
        public EmpController(IMemBll bll)
        {
            this.bll = bll;
        }
        [HttpGet]
        public int Login(string name, string pwd)
        {
            return bll.Login(name, pwd);
        }
        [HttpGet]
        public dynamic Show(string? name, DateTime? min, DateTime? max, string? sex)
        {
            return bll.Show(name, min, max, sex);
        }
    }
}
